package com.assignwork.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;

/**
 * @ClassName WorkArrangeFixedMachineVO
 * @Description 配工固机VO
 * @Author dujianyu
 * @Date 2023/12/19 10:22
 */
@Data
public class WorkArrangeFixedMachineVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "配工ID")
    private Long arrangeId;

    @ApiModelProperty(value = "配工类型")
    private String arrangeType;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "固机ID")
    private Long fixedMachineId;

    @ApiModelProperty(value = "固机名称")
    private String fixedMachineName;

    private String fixedMachinePosition;
    private String fixedMachinePositionName;
    private String machineNo;

    public String getFixedMachineName() {
        if (Func.isNotBlank(fixedMachinePosition)) {
            return fixedMachinePositionName + "门吊_" + fixedMachineName;
        }
        return fixedMachineName;
    }
}
